#include <iostream>
#include <cmath>
using namespace std;
class Point{
public:
    void initPoint(float x=0,float y=0){
        this->x=x;this->y=y;
    }
    void move(float offX,float offY){
        x+=offX;y+=offY;
    }

    float getX() const{return x;}
    float getY() const{return y;}
private:
    float x,y;
};

class Rectangle:public Point{
public:
    void initRectangle(float x,float y, float w,float h){
    	initPoint(x,y);
        this->w=w;
        this->h=h;
    }
    float getW() const{return w;}
    float getH() const{return h;}
private:
    float w,h;
};

int main() {
    Rectangle rect;
    rect.initRectangle(2,3,20,10);
    rect.move(3,2);
    cout<<"x="<<rect.getX()<<endl;
    cout<<"y="<<rect.getY()<<endl;
    cout<<"w="<<rect.getW()<<endl;
    cout<<"h="<<rect.getH()<<endl;
    return 0;
}
